export interface BusinessErrorConstructor {
	(code: number, message?: string): Error
}

export default class BusinessError extends Error {
	private readonly code: number

	constructor(code: number = -1, message?: string) {
		super(message)
		this.code = code
	}

	getCode(): number {
		return this.code
	}
}
